﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shape.Mvp.Sample.Domain.Model;

namespace Shape.Mvp.Sample.Domain.Repositories
{
	public class InMemoryPositionRepository : IRepository<Position>
	{
		private ICollection<Position> _positions =
			new List<Position>() 
			{
            new Position() {Id = Guid.NewGuid(), Description = "Prone Lying"},
            new Position() {Id = Guid.NewGuid(), Description = "Supine Lying"},
				new Position() {Id = Guid.NewGuid(), Description = "Standing"}
			};

		public ICollection<Position> GetAll()
		{
			return _positions;
		}

		public Position GetById(Guid id)
		{
			return _positions.Where(p => p.Id == id).SingleOrDefault();
		}
	}
}
